<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>{$current['title']}-{$Think.CONFIG.sitename}</title>

    <link href="__PUBLIC__/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="__PUBLIC__/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/static/css/animate.min.css" rel="stylesheet">
    <include file="Public/commoncss" />

</head>

<body class="gray-bg top-navigation">
<div id="wrapper">
    <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom white-bg">
            <include file="Public/header" />
        </div>
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="col-sm-3">
                    <div class="ibox float-e-margins">
                        <include file="Public/sidenav" />
                    </div>
                </div>
                <div class="col-sm-9 animated fadeInRight">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>{$current['title']}</h5>
                        </div>
                        <div class="ibox-content">

                            <div class="tabs-container">

                                <div class="tabs-left">
                                    <ul class="nav nav-tabs">
                                        <li class="active">
                                            <a data-toggle="tab" href="#tab-1">客户信息</a>

                                        </li>
                                    </ul>
                                    <div class="tab-content ">
                                        <div id="tab-1" class="tab-pane active">
                                            <div class="panel-body">
                                                <form class="form-horizontal m-t"  action="{:U('update')}" id="memberForm">
                                                    <input type="hidden" name="id" value="{$customer.id}">
                                                    <div class="col-sm-8 col-sm-offset-4">
                                                        <div class="col-sm-5">{:UpImage("head",100,100,$customer['head'])}</div>
                                                    </div>

                                                    <div class="col-sm-12">
                                                        <label class="col-sm-3 control-label"> 姓 名 ：</label>
                                                        <div class="col-sm-5">
                                                            <input type="text"  name="name" class="form-control" placeholder="请填写姓名！" value="{$customer.name}" datatype="s2-10" nullmsg="请填写姓名！" errormsg="姓名至少2个字符,最多10个字符！" maxlength="10" autocomplete="off">
                                                            <span class="help-block m-b-none Validform_checktip"></span>
                                                        </div>
                                                    </div>


                                                    <div class="col-sm-12">
                                                        <label class="col-sm-3 control-label"> 性 别 ：</label>
                                                        <div class="col-sm-5">
                                                            <select class="form-control m-b" name="sex">
                                                                <option value="0" <if condition="$customer['sex'] eq 0">selected="selected"</if>>保密</option>
                                                                <option value="1" <if condition="$customer['sex'] eq 1">selected="selected"</if>>帅哥</option>
                                                                <option value="2" <if condition="$customer['sex'] eq 2">selected="selected"</if>>美女</option>
                                                            </select>
                                                            <span class="help-block m-b-none Validform_checktip"></span>
                                                        </div>
                                                    </div>

                                                    <div class="col-sm-12">
                                                        <label class="col-sm-3 control-label"> 介 绍 ：</label>
                                                        <div class="col-sm-5">
                                                            <textarea name="description" id="" cols="20" rows="5" style="resize: none;width:100%"  autocomplete="off">{$customer.description}</textarea>
                                                            <span class="help-block m-b-none Validform_checktip"></span>
                                                        </div>
                                                    </div>

                                                    <div class="col-sm-12">
                                                        <label class="col-sm-3 control-label"> 公司 ：</label>
                                                        <div class="col-sm-5">
                                                            <input type="text"  name="hightech" class="form-control" placeholder="请填写公司名！" value="{$customer.hightech}" datatype="s2-150" nullmsg="请填写公司名！" errormsg="公司名少2个字符,最多156个字符！" maxlength="150" autocomplete="off">
                                                            <span class="help-block m-b-none Validform_checktip"></span>
                                                        </div>
                                                    </div>

                                                    <div class="col-sm-12">
                                                        <label class="col-sm-3 control-label"> 地址 ：</label>
                                                        <div class="col-sm-5">
                                                            <input type="text"  name="address" class="form-control" placeholder="请填写详细地址！" value="{$customer.address}" datatype="s2-255" nullmsg="请填写详细地址！" errormsg="地址少2个字符,最多255个字符！" maxlength="255" autocomplete="off">
                                                            <span class="help-block m-b-none Validform_checktip"></span>
                                                        </div>
                                                    </div>

                                                    <div class="col-sm-12">
                                                        <label class="col-sm-3 control-label"> 职 务 ：</label>
                                                        <div class="col-sm-5">
                                                            <select class="form-control m-b" name="type">
                                                                <option value="0"  <if condition="$customer['type'] eq 0">selected="selected"</if>>普通员工</option>
                                                                <option value="1"  <if condition="$customer['type'] eq 1">selected="selected"</if>>创 始 人</option>
                                                                <option value="2"  <if condition="$customer['type'] eq 2">selected="selected"</if>> 总 监 </option>
                                                                <option value="3"  <if condition="$customer['type'] eq 3">selected="selected"</if>> 经 理 </option>
                                                            </select>
                                                            <span class="help-block m-b-none Validform_checktip"></span>
                                                        </div>
                                                    </div>


                                                    <div class="col-sm-12">
                                                        <label class="col-sm-3 control-label"> 手机号 ：</label>
                                                        <div class="col-sm-5">
                                                            <input type="text"  name="phone" class="form-control" placeholder="请填写手机号！"  value="{$customer.phone}"  datatype="m" nullmsg="请填写手机号！" errormsg="手机号格式不正确！" maxlength="11" autocomplete="off">
                                                            <span class="help-block m-b-none Validform_checktip"></span>
                                                        </div>
                                                    </div>

                                                    <div class="col-sm-12">
                                                        <label class="col-sm-3 control-label"> 座机电话：</label>
                                                        <div class="col-sm-5">
                                                            <input type="text"  name="tel" class="form-control" placeholder="请填写分机号！"  value="{$customer.tel}"  maxlength="11" autocomplete="off">
                                                            <span class="help-block m-b-none Validform_checktip"></span>
                                                        </div>
                                                    </div>

                                                    <div class="col-sm-12">
                                                        <label class="col-sm-3 control-label"> QQ ：</label>
                                                        <div class="col-sm-5">
                                                            <input type="text"  name="qq" class="form-control" placeholder="请填写QQ号！"  value="{$customer.qq}"   maxlength="16" autocomplete="off">
                                                            <span class="help-block m-b-none Validform_checktip"></span>
                                                        </div>
                                                    </div>

                                                    <div class="col-sm-12">
                                                        <label class="col-sm-3 control-label"> 邮箱：</label>
                                                        <div class="col-sm-5">
                                                            <input type="email"  name="email" class="form-control" placeholder="请填写邮箱！"  value="{$customer.email}"  datatype="e" nullmsg="请填写邮箱！" errormsg="邮箱格式不正确！" maxlength="20" autocomplete="off">
                                                            <span class="help-block m-b-none Validform_checktip"></span>
                                                        </div>
                                                    </div>


                                                    <div class="col-sm-12">
                                                        <label class="col-sm-3 control-label "> 有效否？ ：</label>
                                                        <div class="col-sm-5">
                                                            <select class="form-control m-b " name="stutas">
                                                                <option value="0" class="yellow-bg" <if condition="$customer['stutas'] eq 0">selected="selected"</if>>未验证</option>
                                                                <option value="1" class="blue-bg" <if condition="$customer['stutas'] eq 1">selected="selected"</if>>已验证</option>
                                                                <option value="2" class="red-bg" <if condition="$customer['stutas'] eq 2">selected="selected"</if>>已失效</option>
                                                            </select>
                                                            <span class="help-block m-b-none Validform_checktip"></span>
                                                        </div>
                                                    </div>

                                                    <div class="col-sm-8 col-sm-offset-3">
                                                        <button class="btn btn-primary" type="submit">保存内容</button>
                                                        <span class="help-block m-b-none " id="Tips"></span>
                                                    </div>

                                                </form>
                                            </div>
                                        </div>
                                    </div>

                                </div>

                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
        <include file="Public/footer" />
    </div>
</div>
<include file="Public/commonjs" />
<script src="__PUBLIC__/static/js/bootstrap.min.js?v=3.3.5"></script>
<script src="__PUBLIC__/static/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/static/js/plugins/validate/Validform_v5.3.2.js"></script>

<script>
    $(document).ready(function() {
        $("#memberForm").Validform({
            tiptype:function(msg,o,cssctl){
                if(!o.obj.is("form")){
                    var objtip=o.obj.siblings(".Validform_checktip");
                    cssctl(objtip,o.type);
                    objtip.text(msg);
                }else{
                    if(msg == '操作成功！'){
                        window.location.href="{:U('Customer/index')}";
                    }else{
                        var objtip=o.obj.find("#Tips");
                        cssctl(objtip,o.type);
                        objtip.text(msg);
                    }
                }
            },
            ajaxPost:true
        });


    })
</script>
</body>

</html>